翻訳と辞書
Words near each other
・ Placet (fictional planet)
・ Placetas
・ Placetron
・ Placedo, Texas
・ Placeholder
・ Placeholder (politics)
・ Placeholder name
・ Placekicker
・ PlaceMakers
・ Placemaking
・ Placemat
・ Placement
・ Placement (EDA)
・ Placement exam
・ Placement marriage
Placement syntax
・ Placement testing
・ Placenames Database of Ireland
・ Placencia
・ Placencia Airport
・ Placencia Assassins
・ Placencia Football Field
・ Placencja
・ PlaceNigde poetry festival
・ Placenta
・ Placenta (journal)
・ Placenta accreta
・ Placenta cake
・ Placenta cord banking
・ Placenta praevia


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Placement syntax : ウィキペディア英語版
Placement syntax
In the C++ programming language, placement syntax allows programmers to explicitly specify the memory management of individual objects — i.e. their "placement" in memory. Normally, when an object is created dynamically, an allocation function is invoked in such a way that it will both allocate memory for the object, and initialize the object within the newly allocated memory. The placement syntax allows the programmer to supply additional arguments to the allocation function. A common use is to supply a pointer to a suitable region of storage where the object can be initialized, thus separating memory allocation from object construction.
The "placement" versions of the new and delete operators and functions are known as placement new and placement delete.〔 A new ''expression'', placement or otherwise, calls a new ''function'', also known as an allocator function, whose name is operator new. Similarly, a delete ''expression'' calls a delete ''function'', also known as a deallocator function, whose name is operator delete.〔〔
Any new expression that uses the placement syntax is a placement new expression, and any operator new or operator delete function that takes more than the mandatory first parameter (std::size_t and void
*, respectively) is a placement new or placement delete function.〔
== History ==
In earlier versions of C++ there was no such thing as ''placement new''; instead, developers used explicit assignment to ''this'' within constructors to achieve similar effect.〔 This practice has been deprecated and abolished later, and third edition of ''The C++ Programming Language'' doesn't mention this technique. Support for ''placement new'' operator has been added to compilers circa 1995.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Placement syntax」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.